package main

import (
	"fmt"
	"reflect"
)

type Bar struct {
	Name string
	Age int
}

//年龄数+1
func (u *Bar) AddAge() bool {
	u.Age++
	return true
}

func (d *Bar) Demo () int{
	fmt.Println("bar.damo")
	return 1
}

func main() {
	bar := &Bar{
		Name:"ss",
		Age:4,
	}
	refBar := reflect.ValueOf(bar)
	Demo:= refBar.MethodByName( "Demo"  )
	Demo.Call(make([]reflect.Value,0))
}